<?php
/*!
Application_Model_Component
REQUIRES db.php

*/

require("db.php");
// This class is used to update an entry in the component table.
class Application_Model_Component {
	
	public function update_component($component_id, $ip_address, $location, $last_inspected, $component_comments, $contact_id, $serial_number) 
	{
		//! Queries $component_id, $ip_address, $location, $last_inspected, $component_comments, $contact_id, and $serial_number.\n

        $qstring = "UPDATE component SET ip_address=\"" . $ip_address 
			. "\", location=\"" . $location 
			. "\", last_inspected=\"" . $last_inspected
			. "\", component_comments=\"" . $component_comments
			. "\", contact_id=\"".$contact_id
			. "\", serial_number=\"".$serial_number 
			. "\" WHERE component_id=\"" . $component_id . "\"";
	    
		mysql_query($qstring);
		return $qstring;
	}
}
